<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/css/common.css">
</head>
<body>
	<div class='status'><span>添加货品</span><a class='back' href="{:U('index')}"><strong>返回商品列表<b></b></strong></a></div>
	<form method='post' action="{:U(addItem)}">
	<table class="table">
		<tr>
			<th>ID</th>
			<foreach name='typeName' item='v'>
				<th>{$v.name}</th>
			</foreach>
			<th>库存</th>
			<th>货号</th>
			<th>操作</th>
		</tr>
			<foreach name='list' item='v'>
				<tr>
					<td>{$v.id}</td>
					<foreach name='v.attr' item='value'>
						<td>{$value.value}</td>
					</foreach>
					<td>{$v.inventory}</td>
					<td>{$v.number}</td>
					<td><a href="{:U('updateItem',array('id'=>$v['id'],'gid'=>$_GET['gid']))}">修改</a><a href="{:U('delItem',array('id'=>$v['id']))}">删除</a></td>
				</tr>
			</foreach>	
		<tr>
			<td>添加</td>
			<foreach name='spec' item='v'>
			<td>
				<select class='select' name='attr[]'>
					<option>请选择</option>
					<foreach name='v' item='i'>
						<option value='{$i.id}'>{$i.value}</option>
					</foreach>
				</select>
			</td>
			</foreach>
			<td><input type='text' class='text' name='inventory'/></td>
			<td><input type='text' class='text' name='number'/></td>
			<td>
				<input type='hidden' name='gid' value="{$_GET['gid']}"/>
				<input type='submit' value='添加货品' class='add_btn'/>
			</td>
		</tr>
	</table>
	</form>

</body>
</html>